package com.libb.audio_video_func_comp.jcvideo.util;

import android.content.Context;
import android.text.TextUtils;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.libb.audio_video_func_comp.R;

public class ImageLoadUtil {
    public static void loadNormalAvatar(Context context, ImageView imageView, String url) {
        Glide.with(context).load(url).error(R.mipmap.touxiang_default).into(imageView);
    }
    public static void loadNormalAvatar(Context context, ImageView imageView, int errorId, String url) {
        Glide.with(context).load(url).error(errorId).into(imageView);
    }


    public static void loadNormalPicture(Context context, ImageView imageView, String url) {
        Glide.with(context).load(url).error(R.mipmap.image_jiazai).into(imageView);
    }

    public static void loadBigPicture(Context context, ImageView imageView, String url) {
        if (!TextUtils.isEmpty(url))
        Glide.with(context).load(url).error(R.mipmap.jiazaishibai).into(imageView);
    }
}
